﻿@*@model IEnumerable<Asp.Models.Movie>*@

@model IPagedList<Movie>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>

</p>
    @Html.ActionLink("Create New", "Create")

    @*@using (Html.BeginForm("Index","Movies",FormMethod.Get))
    {
        <p>
            Title:@Html.DropDownList("movieGenre", "All");
            Title:@Html.TextBox("SearchString","dun")<br/>
            <input type="submit" value="Filter"/>
        </p>
    }*@

    @*@using (Ajax.BeginForm(
        new AjaxOptions
        {
            HttpMethod = "get",
            InsertionMode = InsertionMode.Replace,
            UpdateTargetId = "moviesList"
        }))
    {
        <input type="search" name="SearchString"/>
        <input type="submit" value="Filter"/>
    }*@

    <form method="get" action="@Url.Action("Index")"
          data-movies-ajax="true" data-movies-target="#moviesList">

        <input type="search" name="SearchString" data-movies-autocomplete ="@Url.Action("AutoComplete")"/>
        @*<input type="search" name="SearchString"/>*@
        <input type="submit" value="Filter"/>
     </form>

@*@Html.Action("SayHello")*@

@{ 
    var account = 10.0m;
    var date = DateTime.Now;
}

<div>
    @Asp.Controllers.Resource.Hello
</div>

<div>
    @account.ToString("c")
</div>
<div>
    @date.ToShortDateString()
</div>

@Html.Partial("_Movies",Model)

